package com.handinglian.ai.common.dto;

/**
 * 枚举了一些常用API操作码
 * Created by macro on 2019/4/19.
 */
public enum ResultCode implements IErrorCode {
    SUCCESS(100000, "操作成功"),
    FAILED(100001, "操作失败"),
    DUPLICATE(100002, "该数据已经存在!"),
    EXIST_IN_DELETE(100003, "该数据已经存在于删除列表中，是否恢复!"),
    EXIST_IN_HISTORY(100004, "该账号已存在于历史员工库中"),
    LOGIN_FAILURE(100005, "登录失败!"),
    NOT_LOGIN(100006, "请先登录!!"),
    AUTHORIZE_FAIL(100007, "没有相关访问权限!!");

    private Integer code;
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
